//
//  M1DetailsListCell.m
//  NewMarryU
//
//  Created by Cedar on 2018/7/23.
//  Copyright © 2018年 Cedar. All rights reserved.
//

#import "M1DetailsListCell.h"

@implementation M1DetailsListCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self m1_createUI];
    }
    return self;
}

- (void) m1_createUI{
    self.m1_title = [[UILabel alloc] init];
    _m1_title.textColor = m1_color(0x999999);
    _m1_title.font = m1_font(15);
    [self.contentView addSubview:_m1_title];
    
    [_m1_title mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView.mas_centerY);
        make.left.offset(20);
    }];
    
    self.m1_content = [[UILabel alloc] init];
    _m1_content.textColor = m1_color(0x333333);
    _m1_content.font = m1_font(15);
    [self.contentView addSubview:_m1_content];
    
    [_m1_content mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView.mas_centerY);
        make.right.offset(-20);
    }];
    
    UIView *line = [[UIView alloc] init];
    line.backgroundColor = m1_color(0xCCCCCC);
    [self.contentView addSubview:line];
    
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(20);
        make.right.offset(-20);
        make.bottom.offset(0);
        make.height.offset(0.5);
    }];
}



- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
